import qs from 'qs';
import http from '@/utils/axios/axios'
import {setStorage, getStorage} from '@/utils/tools/tools'


let  userTemp ={};


// 新增标注内容(第一次顺便新增标注画线)
export function addLabelContent(data) {
  //return http.post(`/temr/filterSkip/labelContent/addLabelContent`, data)
  userTemp = getStorage('user');
  if(typeof userTemp.sessionId !== 'undefined'){
    return http.post(`/temr/filterSkip/labelContent/addLabelContent`, data)
  }else{
    return new Promise((resolve,reject)=>{
      resolve({data:{data:null}});
    });
  }
}


// 根据病例id查询所有标注画线和内容
export function queryLabelContents(data) {
  return http.get(`/temr/filterSkip/labelContent/queryLabelContents/${data.id}`)
 /* userTemp = getStorage('user');
  if(typeof userTemp.sessionId !== 'undefined'){
    return http.get(`/temr/filterSkip/labelContent/queryLabelContents/${data.id}`)
  }else{
    return new Promise((resolve,reject)=>{
      resolve({data:{data:null}});
    });
  }*/

}
//删除label框
export function deleteLabelContents(data){
  return http.get(`/temr/filterSkip/labelContent/deleteLabel/${data}`);

}